﻿using System.Collections.Generic;
using WaitLess.Business.Data.Model.Antwerpen;
using WaitLess.Business.Repositories.Interfaces;
using WaitLess.Business.Services;
using WaitLess.Business.Services.Interfaces;
using WaitLess.Business.Tests.Common;
using WaitLess.Business.Tests.Stubs;

namespace WaitLess.Business.Tests.Unit
{
    public abstract class MunicipalOfficeLoaderAsyncTestBase : AsyncTestBase
    {
        protected IMunicipalOfficeLoader MunicipalOfficeLoader { get; private set; }
        protected IDistrictshuisRepository DistrictshuisRepository { get; private set; }
        protected IStadskantoorRepository StadskantoorRepository { get; private set; }
        protected IVenuesRepository VenuesRepository { get; private set; }

        protected Districtshuizen Districtshuizen { get; set; }
        protected Stadskantoren Stadskantoren { get; set; }

        protected override void Arrange()
        {
            base.Arrange();

            DistrictshuisRepository = new DistrictshuisRepositoryStub();
            Districtshuizen = new Districtshuizen { districtshuis = new List<Districtshuis> { new Districtshuis() } };
            ((DistrictshuisRepositoryStub)DistrictshuisRepository).GetAllResult = Districtshuizen;

            StadskantoorRepository = new StadskantoorRepositoryStub();
            Stadskantoren = new Stadskantoren { stadskantoor = new List<Stadskantoor> { new Stadskantoor() } };
            ((StadskantoorRepositoryStub)StadskantoorRepository).GetAllResult = Stadskantoren;

            VenuesRepository = new VenuesRepositoryStub();

            MunicipalOfficeLoader = new MunicipalOfficeLoader(DistrictshuisRepository, StadskantoorRepository, VenuesRepository);
        }
    }
}
